﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/PC4APPLE
 * 时间：2013-12-24 15:52:16
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.CRM
{
	/// <summary>富力经济线运送状态</summary>
	[Serializable]
	[DataObject]
	[Description("富力经济线运送状态")]
	[BindIndex("PK__ExpressELStatusID__E93961F233C1825F", true, "ID")]
	[BindIndex("IX_ExpressELStatus_OrganizeID_No", false, "OrganizeID,CWBNo")]
	[BindIndex("IX_ExpressELStatus_CreateUserID", false, "CreateUserID")]
	[BindIndex("IX_ExpressELStatus_CustomerID_No", false, "CustomerID,CWBNo")]
	[BindIndex("IX_ExpressELStatus_CWBNo_OperationStatus", true, "CWBNo,OperationStatus")]
	[BindIndex("IX_ExpressELStatus_ExpressMixID", false, "ExpressMixID")]
	[BindIndex("IX_ExpressELStatus_OperationStatus_OperationTime", false, "OperationStatus,IsCompleted,OperationTime")]
	[BindRelation("ExpressMixID", false, "ExpressEconomyLine", "ID")]
	[BindTable("ExpressEconomyLineStatus", Description = "富力经济线运送状态", ConnName = "EmeCRM", DbType = DatabaseType.SqlServer)]
	public abstract partial class ExpressEconomyLineStatus<TEntity> : IExpressEconomyLineStatus
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private Int32 _ExpressMixID;

		/// <summary>快件</summary>
		[DisplayName("快件")]
		[Description("快件")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "ExpressMixID", "快件", null, "int", 10, 0, false)]
		public virtual Int32 ExpressMixID
		{
			get { return _ExpressMixID; }
			set { if (OnPropertyChanging(__.ExpressMixID, value)) { _ExpressMixID = value; OnPropertyChanged(__.ExpressMixID); } }
		}

		private String _CWBNo;

		/// <summary>运单号</summary>
		[DisplayName("运单号")]
		[Description("运单号")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(3, "CWBNo", "运单号", null, "nvarchar(20)", 0, 0, true)]
		public virtual String CWBNo
		{
			get { return _CWBNo; }
			set { if (OnPropertyChanging(__.CWBNo, value)) { _CWBNo = value; OnPropertyChanged(__.CWBNo); } }
		}

		private Int32 _OrganizeID;

		/// <summary>所属部门</summary>
		[DisplayName("所属部门")]
		[Description("所属部门")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(4, "OrganizeID", "所属部门", null, "int", 10, 0, false)]
		public virtual Int32 OrganizeID
		{
			get { return _OrganizeID; }
			set { if (OnPropertyChanging(__.OrganizeID, value)) { _OrganizeID = value; OnPropertyChanged(__.OrganizeID); } }
		}

		private Int32 _CustomerID;

		/// <summary>所属客户</summary>
		[DisplayName("所属客户")]
		[Description("所属客户")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(5, "CustomerID", "所属客户", null, "int", 10, 0, false)]
		public virtual Int32 CustomerID
		{
			get { return _CustomerID; }
			set { if (OnPropertyChanging(__.CustomerID, value)) { _CustomerID = value; OnPropertyChanged(__.CustomerID); } }
		}

		private String _ExpressType;

		/// <summary>快递方式</summary>
		[DisplayName("快递方式")]
		[Description("快递方式")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(6, "ExpressType", "快递方式", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ExpressType
		{
			get { return _ExpressType; }
			set { if (OnPropertyChanging(__.ExpressType, value)) { _ExpressType = value; OnPropertyChanged(__.ExpressType); } }
		}

		private String _OriginNo;

		/// <summary>转运单号</summary>
		[DisplayName("转运单号")]
		[Description("转运单号")]
		[DataObjectField(false, false, true, 20)]
		[BindColumn(7, "OriginNo", "转运单号", null, "nvarchar(20)", 0, 0, true)]
		public virtual String OriginNo
		{
			get { return _OriginNo; }
			set { if (OnPropertyChanging(__.OriginNo, value)) { _OriginNo = value; OnPropertyChanged(__.OriginNo); } }
		}

		private DateTime _OperationTime;

		/// <summary>操作时间</summary>
		[DisplayName("操作时间")]
		[Description("操作时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(8, "OperationTime", "操作时间", null, "datetime", 3, 0, false)]
		public virtual DateTime OperationTime
		{
			get { return _OperationTime; }
			set { if (OnPropertyChanging(__.OperationTime, value)) { _OperationTime = value; OnPropertyChanged(__.OperationTime); } }
		}

		private String _OperationStatus;

		/// <summary>操作状态</summary>
		[DisplayName("操作状态")]
		[Description("操作状态")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(9, "OperationStatus", "操作状态", null, "nvarchar(50)", 0, 0, true)]
		public virtual String OperationStatus
		{
			get { return _OperationStatus; }
			set { if (OnPropertyChanging(__.OperationStatus, value)) { _OperationStatus = value; OnPropertyChanged(__.OperationStatus); } }
		}

		private Int32 _OperationOrganizeID;

		/// <summary>操作部门</summary>
		[DisplayName("操作部门")]
		[Description("操作部门")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(10, "OperationOrganizeID", "操作部门", null, "int", 10, 0, false)]
		public virtual Int32 OperationOrganizeID
		{
			get { return _OperationOrganizeID; }
			set { if (OnPropertyChanging(__.OperationOrganizeID, value)) { _OperationOrganizeID = value; OnPropertyChanged(__.OperationOrganizeID); } }
		}

		private Int32 _OperationStaffID;

		/// <summary>操作员工</summary>
		[DisplayName("操作员工")]
		[Description("操作员工")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(11, "OperationStaffID", "操作员工", null, "int", 10, 0, false)]
		public virtual Int32 OperationStaffID
		{
			get { return _OperationStaffID; }
			set { if (OnPropertyChanging(__.OperationStaffID, value)) { _OperationStaffID = value; OnPropertyChanged(__.OperationStaffID); } }
		}

		private String _SignedPerson;

		/// <summary>签收人</summary>
		[DisplayName("签收人")]
		[Description("签收人")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(12, "SignedPerson", "签收人", null, "nvarchar(50)", 0, 0, true)]
		public virtual String SignedPerson
		{
			get { return _SignedPerson; }
			set { if (OnPropertyChanging(__.SignedPerson, value)) { _SignedPerson = value; OnPropertyChanged(__.SignedPerson); } }
		}

		private String _Description;

		/// <summary>操作说明</summary>
		[DisplayName("操作说明")]
		[Description("操作说明")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(13, "Description", "操作说明", null, "nvarchar(200)", 0, 0, true)]
		public virtual String Description
		{
			get { return _Description; }
			set { if (OnPropertyChanging(__.Description, value)) { _Description = value; OnPropertyChanged(__.Description); } }
		}

		private SByte _IsCompleted;

		/// <summary>是否完成</summary>
		[DisplayName("是否完成")]
		[Description("是否完成")]
		[DataObjectField(false, false, true, 3)]
		[BindColumn(14, "IsCompleted", "是否完成", null, "tinyint", 3, 0, false)]
		public virtual SByte IsCompleted
		{
			get { return _IsCompleted; }
			set { if (OnPropertyChanging(__.IsCompleted, value)) { _IsCompleted = value; OnPropertyChanged(__.IsCompleted); } }
		}

		private Boolean _IsDelete;

		/// <summary>逻辑删除</summary>
		[DisplayName("逻辑删除")]
		[Description("逻辑删除")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(15, "IsDelete", "逻辑删除", null, "bit", 0, 0, false)]
		public virtual Boolean IsDelete
		{
			get { return _IsDelete; }
			set { if (OnPropertyChanging(__.IsDelete, value)) { _IsDelete = value; OnPropertyChanged(__.IsDelete); } }
		}

		private DateTime _ModifiedOn;

		/// <summary>修改时间</summary>
		[DisplayName("修改时间")]
		[Description("修改时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(16, "ModifiedOn", "修改时间", null, "datetime", 3, 0, false)]
		public virtual DateTime ModifiedOn
		{
			get { return _ModifiedOn; }
			set { if (OnPropertyChanging(__.ModifiedOn, value)) { _ModifiedOn = value; OnPropertyChanged(__.ModifiedOn); } }
		}

		private Int32 _ModifiedUserID;

		/// <summary>修改用户ID</summary>
		[DisplayName("修改用户ID")]
		[Description("修改用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(17, "ModifiedUserID", "修改用户ID", null, "int", 10, 0, false)]
		public virtual Int32 ModifiedUserID
		{
			get { return _ModifiedUserID; }
			set { if (OnPropertyChanging(__.ModifiedUserID, value)) { _ModifiedUserID = value; OnPropertyChanged(__.ModifiedUserID); } }
		}

		private String _ModifiedBy;

		/// <summary>修改用户</summary>
		[DisplayName("修改用户")]
		[Description("修改用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(18, "ModifiedBy", "修改用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ModifiedBy
		{
			get { return _ModifiedBy; }
			set { if (OnPropertyChanging(__.ModifiedBy, value)) { _ModifiedBy = value; OnPropertyChanged(__.ModifiedBy); } }
		}

		private DateTime _CreateOn;

		/// <summary>创建时间</summary>
		[DisplayName("创建时间")]
		[Description("创建时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(19, "CreateOn", "创建时间", null, "datetime", 3, 0, false)]
		public virtual DateTime CreateOn
		{
			get { return _CreateOn; }
			set { if (OnPropertyChanging(__.CreateOn, value)) { _CreateOn = value; OnPropertyChanged(__.CreateOn); } }
		}

		private Int32 _CreateUserID;

		/// <summary>创建用户ID</summary>
		[DisplayName("创建用户ID")]
		[Description("创建用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(20, "CreateUserID", "创建用户ID", null, "int", 10, 0, false)]
		public virtual Int32 CreateUserID
		{
			get { return _CreateUserID; }
			set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } }
		}

		private String _CreateBy;

		/// <summary>创建用户</summary>
		[DisplayName("创建用户")]
		[Description("创建用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(21, "CreateBy", "创建用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CreateBy
		{
			get { return _CreateBy; }
			set { if (OnPropertyChanging(__.CreateBy, value)) { _CreateBy = value; OnPropertyChanged(__.CreateBy); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.ExpressMixID: return _ExpressMixID;
					case __.CWBNo: return _CWBNo;
					case __.OrganizeID: return _OrganizeID;
					case __.CustomerID: return _CustomerID;
					case __.ExpressType: return _ExpressType;
					case __.OriginNo: return _OriginNo;
					case __.OperationTime: return _OperationTime;
					case __.OperationStatus: return _OperationStatus;
					case __.OperationOrganizeID: return _OperationOrganizeID;
					case __.OperationStaffID: return _OperationStaffID;
					case __.SignedPerson: return _SignedPerson;
					case __.Description: return _Description;
					case __.IsCompleted: return _IsCompleted;
					case __.IsDelete: return _IsDelete;
					case __.ModifiedOn: return _ModifiedOn;
					case __.ModifiedUserID: return _ModifiedUserID;
					case __.ModifiedBy: return _ModifiedBy;
					case __.CreateOn: return _CreateOn;
					case __.CreateUserID: return _CreateUserID;
					case __.CreateBy: return _CreateBy;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.ExpressMixID: _ExpressMixID = Convert.ToInt32(value); break;
					case __.CWBNo: _CWBNo = Convert.ToString(value); break;
					case __.OrganizeID: _OrganizeID = Convert.ToInt32(value); break;
					case __.CustomerID: _CustomerID = Convert.ToInt32(value); break;
					case __.ExpressType: _ExpressType = Convert.ToString(value); break;
					case __.OriginNo: _OriginNo = Convert.ToString(value); break;
					case __.OperationTime: _OperationTime = Convert.ToDateTime(value); break;
					case __.OperationStatus: _OperationStatus = Convert.ToString(value); break;
					case __.OperationOrganizeID: _OperationOrganizeID = Convert.ToInt32(value); break;
					case __.OperationStaffID: _OperationStaffID = Convert.ToInt32(value); break;
					case __.SignedPerson: _SignedPerson = Convert.ToString(value); break;
					case __.Description: _Description = Convert.ToString(value); break;
					case __.IsCompleted: _IsCompleted = Convert.ToSByte(value); break;
					case __.IsDelete: _IsDelete = Convert.ToBoolean(value); break;
					case __.ModifiedOn: _ModifiedOn = Convert.ToDateTime(value); break;
					case __.ModifiedUserID: _ModifiedUserID = Convert.ToInt32(value); break;
					case __.ModifiedBy: _ModifiedBy = Convert.ToString(value); break;
					case __.CreateOn: _CreateOn = Convert.ToDateTime(value); break;
					case __.CreateUserID: _CreateUserID = Convert.ToInt32(value); break;
					case __.CreateBy: _CreateBy = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得富力经济线运送状态字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>快件</summary>
			public static readonly Field ExpressMixID = FindByName(__.ExpressMixID);

			///<summary>运单号</summary>
			public static readonly Field CWBNo = FindByName(__.CWBNo);

			///<summary>所属部门</summary>
			public static readonly Field OrganizeID = FindByName(__.OrganizeID);

			///<summary>所属客户</summary>
			public static readonly Field CustomerID = FindByName(__.CustomerID);

			///<summary>快递方式</summary>
			public static readonly Field ExpressType = FindByName(__.ExpressType);

			///<summary>转运单号</summary>
			public static readonly Field OriginNo = FindByName(__.OriginNo);

			///<summary>操作时间</summary>
			public static readonly Field OperationTime = FindByName(__.OperationTime);

			///<summary>操作状态</summary>
			public static readonly Field OperationStatus = FindByName(__.OperationStatus);

			///<summary>操作部门</summary>
			public static readonly Field OperationOrganizeID = FindByName(__.OperationOrganizeID);

			///<summary>操作员工</summary>
			public static readonly Field OperationStaffID = FindByName(__.OperationStaffID);

			///<summary>签收人</summary>
			public static readonly Field SignedPerson = FindByName(__.SignedPerson);

			///<summary>操作说明</summary>
			public static readonly Field Description = FindByName(__.Description);

			///<summary>是否完成</summary>
			public static readonly Field IsCompleted = FindByName(__.IsCompleted);

			///<summary>逻辑删除</summary>
			public static readonly Field IsDelete = FindByName(__.IsDelete);

			///<summary>修改时间</summary>
			public static readonly Field ModifiedOn = FindByName(__.ModifiedOn);

			///<summary>修改用户ID</summary>
			public static readonly Field ModifiedUserID = FindByName(__.ModifiedUserID);

			///<summary>修改用户</summary>
			public static readonly Field ModifiedBy = FindByName(__.ModifiedBy);

			///<summary>创建时间</summary>
			public static readonly Field CreateOn = FindByName(__.CreateOn);

			///<summary>创建用户ID</summary>
			public static readonly Field CreateUserID = FindByName(__.CreateUserID);

			///<summary>创建用户</summary>
			public static readonly Field CreateBy = FindByName(__.CreateBy);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得富力经济线运送状态字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>快件</summary>
			public const String ExpressMixID = "ExpressMixID";

			///<summary>运单号</summary>
			public const String CWBNo = "CWBNo";

			///<summary>所属部门</summary>
			public const String OrganizeID = "OrganizeID";

			///<summary>所属客户</summary>
			public const String CustomerID = "CustomerID";

			///<summary>快递方式</summary>
			public const String ExpressType = "ExpressType";

			///<summary>转运单号</summary>
			public const String OriginNo = "OriginNo";

			///<summary>操作时间</summary>
			public const String OperationTime = "OperationTime";

			///<summary>操作状态</summary>
			public const String OperationStatus = "OperationStatus";

			///<summary>操作部门</summary>
			public const String OperationOrganizeID = "OperationOrganizeID";

			///<summary>操作员工</summary>
			public const String OperationStaffID = "OperationStaffID";

			///<summary>签收人</summary>
			public const String SignedPerson = "SignedPerson";

			///<summary>操作说明</summary>
			public const String Description = "Description";

			///<summary>是否完成</summary>
			public const String IsCompleted = "IsCompleted";

			///<summary>逻辑删除</summary>
			public const String IsDelete = "IsDelete";

			///<summary>修改时间</summary>
			public const String ModifiedOn = "ModifiedOn";

			///<summary>修改用户ID</summary>
			public const String ModifiedUserID = "ModifiedUserID";

			///<summary>修改用户</summary>
			public const String ModifiedBy = "ModifiedBy";

			///<summary>创建时间</summary>
			public const String CreateOn = "CreateOn";

			///<summary>创建用户ID</summary>
			public const String CreateUserID = "CreateUserID";

			///<summary>创建用户</summary>
			public const String CreateBy = "CreateBy";
		}

		#endregion
	}

	/// <summary>富力经济线运送状态接口</summary>
	public partial interface IExpressEconomyLineStatus
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>快件</summary>
		Int32 ExpressMixID { get; set; }

		/// <summary>运单号</summary>
		String CWBNo { get; set; }

		/// <summary>所属部门</summary>
		Int32 OrganizeID { get; set; }

		/// <summary>所属客户</summary>
		Int32 CustomerID { get; set; }

		/// <summary>快递方式</summary>
		String ExpressType { get; set; }

		/// <summary>转运单号</summary>
		String OriginNo { get; set; }

		/// <summary>操作时间</summary>
		DateTime OperationTime { get; set; }

		/// <summary>操作状态</summary>
		String OperationStatus { get; set; }

		/// <summary>操作部门</summary>
		Int32 OperationOrganizeID { get; set; }

		/// <summary>操作员工</summary>
		Int32 OperationStaffID { get; set; }

		/// <summary>签收人</summary>
		String SignedPerson { get; set; }

		/// <summary>操作说明</summary>
		String Description { get; set; }

		/// <summary>是否完成</summary>
		SByte IsCompleted { get; set; }

		/// <summary>逻辑删除</summary>
		Boolean IsDelete { get; set; }

		/// <summary>修改时间</summary>
		DateTime ModifiedOn { get; set; }

		/// <summary>修改用户ID</summary>
		Int32 ModifiedUserID { get; set; }

		/// <summary>修改用户</summary>
		String ModifiedBy { get; set; }

		/// <summary>创建时间</summary>
		DateTime CreateOn { get; set; }

		/// <summary>创建用户ID</summary>
		Int32 CreateUserID { get; set; }

		/// <summary>创建用户</summary>
		String CreateBy { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}